const Login = {
  state() {
    // 存储用户的登录数据
    return {
      user: window.localStorage.getItem("user"),
    };
  },
  mutations: {
    changeuser(state, payload) {
      state.user = payload;
      localStorage.setItem("user", JSON.stringify(payload));
    },
    // 由于页面刷新user值会改变，所以将其存入本地存储中
  },
};
export default Login;
